package cn.shadow;

import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        String str = in.nextLine();
        String[] words = str.split("\\s+");
        for(int i = words.length-1 ; i >= 0 ; i--){
            if(i!=0){
                System.out.print(words[i]+" ");
            }
            else {
                System.out.print(words[i]);
            }
        }

    }
}